package com.lyn.seckill.service.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserModel {

    private Integer id;
    @NotBlank(message = "用户名必填")
    private String name;
    private Boolean gender;

    @Min(value= 0 ,message = "年龄必须大于0")
    @Max(value= 150, message = "年龄必须小于150")
    @NotNull(message = "年龄必填")
    private Integer age;

    @NotBlank(message = "手机号必填")
    private String telephone;
    private String registerMode;
    private String thirdPartyId;

    @NotBlank(message = "密码必填")
    private String encryptPassword;
}
